package com.bdmc.web.controller.alarm;

import com.bdmc.alarm.service.IAlarmDetailService;
import com.bdmc.common.core.controller.BaseController;
import com.bdmc.common.core.domain.AjaxResult;
import com.bdmc.device.domain.bo.DevFacilityRealtimeBo;
import com.bdmc.device.domain.vo.DevFacilityRealtimeVo;
import com.bdmc.device.service.IDevFacilityRealtimeService;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RequiredArgsConstructor(onConstructor_ = @Autowired)
@RestController
@RequestMapping("/alarm/fac")
public class AlarmFacilityController extends BaseController {

    private final IDevFacilityRealtimeService facRealtimeService;

    /**
     * 垃圾桶漫溢告警
     * @return list
     */
    @GetMapping("/list")
    public AjaxResult<List<DevFacilityRealtimeVo>> list(){
        List<DevFacilityRealtimeVo> realtimeList = facRealtimeService.selectDevFacilityRealtimeList(new DevFacilityRealtimeBo().setOverflow(1));
        return AjaxResult.success(realtimeList);
    }

}
